<template>
  <div id="app">
    <!-- 写一个功能，根据不同的属性生成不同的标签 -->
    <level type="1" >131</level>
    <level type="2" >4123</level>
    <my-menu :data="tree"></my-menu>
  </div>
</template>

<script>
import Level from './components/Level'
import MyMenu from './components/my-menu.jsx'
export default {
  name: 'App',
  components: {
    Level,
    MyMenu
  },
  data: () => {
    return {
      tree: [
      {
        title: '菜单1',
        children: [
          {
            title: '菜单1-1',
            children: []
          }
        ]
      },
      {
        title: '菜单2',
        children: []
      },
      {
        title: '菜单3',
        children: [
          {
            title: '菜单3-1',
            children: []
          }
        ]
      },
      {
        title: '菜单4',
        children: [
          {
            title: '菜单4-1',
            children: []
          }
        ]
      }
    ]
    }
  }
}
</script>